import os
import socket
import curses

import utils

run = True

current_path = os.getcwd() + "/"
current_file = utils.file_system.get_files(os.listdir(current_path), current_path)[0]
current_selected = current_file

username = os.getlogin()
hostname = socket.gethostname()

# Initilize curses.
stdscr = curses.initscr()
#curses.curs_set(1)
curses.start_color()
curses.noecho()
curses.cbreak()
curses.curs_set(False)
stdscr.scrollok(False)
stdscr.keypad(True)

# Init color pairs.
curses.init_pair(1, curses.COLOR_BLUE, curses.COLOR_BLACK)
curses.init_pair(2, curses.COLOR_WHITE, curses.COLOR_BLACK)
curses.init_pair(3, curses.COLOR_RED, curses.COLOR_BLACK)
curses.init_pair(4, curses.COLOR_RED, curses.COLOR_BLACK)

directory_color = curses.color_pair(1)
file_color = curses.color_pair(2)
username_color = curses.color_pair(3)
warning_color = curses.color_pair(4)

directory_style = curses.A_BOLD
file_style = curses.A_NORMAL
username_style = curses.A_BOLD

terminal_size = stdscr.getmaxyx()
terminal_size = [terminal_size[1], terminal_size[0]]

non_printable_characters = "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0b\x0c\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\xad\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"

cause_stdcsr_clear = False

left_update = True

find_number = 0
find_session = False
find_list = []

